#include <iostream>
using namespace std;

int main()
{
	int a[10] = {0};
	int bench = 30;
	for(int i = 0; i < 10; i++)
	{
		cin >> a[i];
	}
	int hand = 0,count = 0;
	cin >> hand;
	for(int j = 0; j < 10; j++)
	{
		if(hand + bench >= a[j])
			count++;
	}
	cout << count << endl;
	return 0;
}



